package org.jrfe.sys;

/**
 * Engine Context interface </br>
 * Engine loop  </br>
 *  if(initialize()) </br>
 *  	while(running){ </br>
 *  		render(); </br>
 *  		update(); </br>
 *  	} </br>
 *  	cleanup(); </br>
 *  } </br>
 *  </br>
 *  All rendering must happen in render() if its done else where outcome is unknown
 *  
 * @author Kalvis Freimanis
 */
public interface JRFEContext {

	/**
	 * Initialize resources and all needed stuff
	 * @return true to continue with running
	 */
	public boolean initialize();
	
	/**
	 * Render scene
	 * @return true to continue with running
	 */
	public boolean render();

	/**
	 * Update engine states and data
	 * @return true to continue with running
	 */
	public boolean update();
	
	/**
	 * Clean up loaded resources and other stuff
	 */
	public void cleanup();
	
}
